<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:pou="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:component>
        <h:form id="edit_red">
            <pou:dialog widgetVar="editarRed" header="Editar Red" showEffect="fade"
                        hideEffect="fade" modal="true" resizable="false" 
                        onHide="#{redController.prepareList()}">

                <h:panelGrid columns="2" id="grid">  
                    <h:outputLabel value="Nombre" for="txt_title" />  
                    <pou:inputText id="txt_title"   
                                   value="#{redController.selected.nombreRed}" required="true"/>  

                    <h:outputLabel value="Descripción" for="txt_author" />  
                    <pou:inputText id="txt_author" required="true"   
                                   value="#{redController.selected.descripcionRed}" />

                    <pou:commandButton value="Guardar" icon="save" update=":currentUI"
                                       actionListener="#{redController.update}"
                                       oncomplete="editarRed.hide();">
                    </pou:commandButton>
                </h:panelGrid>
            </pou:dialog>
        </h:form>
    </ui:component>
</html>
